import {PropsWithChildren} from "react";
import {Resizable} from "re-resizable";

interface Props {
    minWidth?: number;
}

export function DialogResizeableSidebar(props: PropsWithChildren<Props>) {
    const {minWidth = 210, children} = props;
    return (
        <Resizable
            minWidth={210}
            maxWidth={320}
            defaultSize={{
                width: 210,
                height: "100%",
            }}
            style={{
                borderRight: '1px solid #d9d9d9',
                borderLeft: '1px solid #d9d9d9',
                backgroundColor: '#ffffff'
            }}
        >
            {children}
        </Resizable>
    );
}
